Skip to content

Dynamic signature-mismatch error and template-based tests/test.json (from develop #171, #172) - #173

Merged
ritaagarwala-sf merged 2 commits into
mainfrom
dynamic_error_and_test_json_main
Nov 12, 2026
Merged

ritaagarwala-sf merged 2 commits into
mainfrom
dynamic_error_and_test_json_main

Conversation

@ritaagarwala-sf

Copy link
Copy Markdown
Collaborator

Summary

Cherry-picks two already-merged develop changes onto main:

  • Dynamic error message for function signature mismatch  #171 – Dynamic error message for function signature mismatch (W-24747155). The deploy contract-mismatch error is built from the registered features instead of always naming SearchIndexChunkingV1Request/Response. REQUEST_TYPE_TO_FEATURE is keyed by (request_type, response_type), and the new describe_supported_signatures() narrows the hint to the matching feature as Req/Resp for use_in_feature: <Feature>.
  • Copy tests/test.json from the function template instead of generating it #172 – Copy tests/test.json from the function template. datacustomcode init --code-type function copies payload/tests/test.json from the template instead of generating one. _generate_function_test_file() stays as a fallback when the template has none.

Test plan

  • pytest tests/test_cli.py tests/test_deploy.py tests/test_describe_supported_signatures.py tests/test_function_utils.py tests/test_template.py (104 passed)
  • mypy src/datacustomcode/cli.py src/datacustomcode/deploy.py
  • datacustomcode init <dir> --code-type function copies a tests/test.json identical to the template's

🤖 Generated with Claude Code

* Dynamic error message instead of static for function signature mistmatch

* Fixing lint error
… it (#172)

* Copying tests/test.json from templates instead of generating a new one

* Lint error fix
@ritaagarwala-sf
ritaagarwala-sf merged commit dea521d into main Nov 12, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants